package org.jeecg.modules.rooms.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.rooms.entity.CesHouseLongRentCharge;
import org.jeecg.modules.rooms.entity.CesHouseLongRentScheme;
import org.jeecg.modules.rooms.service.ICesHouseLongRentChargeService;
import org.jeecg.modules.rooms.service.ICesHouseLongRentSchemeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/rooms/houseLongRentCharges")
@Api(tags = "ces_house_long_rent_charge")
@Slf4j
public class CesHouseLongRentChargesController  extends JeecgController<CesHouseLongRentCharge, ICesHouseLongRentChargeService> {

    /**
     * 获取长租订单费项
     */
    @AutoLog(value = "获取长租订单费项")
    @ApiOperation(value="获取长租订单费项", notes="getMeterCharge")
    @GetMapping("/getMeterCharge")
    public Result<List<CesHouseLongRentCharge>> getMeterCharge(String livingOrderId) {
        List<CesHouseLongRentCharge> houseLongRentChargeList = service.list(Wrappers.<CesHouseLongRentCharge>lambdaQuery()
                .eq(CesHouseLongRentCharge::getLivingOrderId, livingOrderId));
        return Result.ok(houseLongRentChargeList);
    }

}
